Angle and orientation measurements for vehicles with multiple drivable sections

ABSTRACT

Techniques are described for measuring angle and/or orientation of a rear drivable section (e.g., a trailer unit of a semi-trailer truck) relative to a front drivable section (e.g., a tractor unit of the semi-trailer truck) using an example rotary encoder assembly. The example rotary encoder assembly comprises a base surface; a housing that includes a second end that is connected to the base surface and a first end that is at least partially open and is coupled to a housing cap; and a rotary encoder that is located in the housing in between the base surface and the housing cap, where the rotary encoder includes a rotatable shaft that protrudes from a first hole located in the housing cap, and where a top of the rotatable shaft located away from the rotary encoder is coupled to magnet(s).

PRIORITY CLAIMS AND RELATED PATENT APPLICATIONS

This patent document claims the priority to and the benefits of U.S. Provisional Application No. 63/040,662 entitled “TRAILER ANGLE MEASUREMENT USING A ROTARY ENCODER TO THE FIFTH WHEEL” filed on Jun. 18, 2020. The entire disclosure of the aforementioned application is hereby incorporated by reference as part of the disclosure of this application.

TECHNICAL FIELD

This document relates to systems, apparatus, and methods to measure angles and/or orientations on a vehicle with multiple drivable sections.

BACKGROUND

Autonomous vehicle navigation is a technology that can allow a vehicle to sense the position and movement of vehicles around an autonomous vehicle and, based on the sensing, control the autonomous vehicle to safely navigate towards a destination. An autonomous vehicle may control the steering angle, a throttle amount to control the speed of the autonomous vehicle, gear changes, and/or a breaking amount to control the extent to which the brakes are engaged. An autonomous vehicle may operate in several modes. In some cases, an autonomous vehicle may allow a driver to operate the autonomous vehicle as a conventional vehicle by controlling the steering, throttle, clutch, gear shifter, and/or other devices. In other cases, a driver may engage the autonomous vehicle navigation technology to allow the vehicle to be driven by itself.

SUMMARY

This patent document describes systems, apparatus, and methods to measure angles and/or orientations (e.g., directions of rotations) of a rear drivable section of a vehicle relative to a front drivable section of the vehicle.

In an exemplary embodiment a vehicle, comprises a front drivable section that comprises a first connector and a rotary encoder assembly. The first connector is coupled to a chassis of the front drivable section, where the first connector is located towards a rear region of the first drivable section. The rotary encoder assembly comprises a base surface, a housing and a rotary encoder. The base surface of the rotary encoder assembly includes the base surface that is coupled to a surface located below the first connector. The housing of the rotary encoder assembly includes a first end that is at least partially open and a second end that is opposite to the first end, where the second end of the housing is connected to the base surface, and where the first end of the housing is coupled to a housing cap. The rotary encoder assembly includes the rotary encoder that is located in the housing in between the base surface and the housing cap, where the rotary encoder includes a rotatable shaft that protrudes from a first hole located in the housing cap, and where a top of the rotatable shaft located away from the rotary encoder is coupled to one or more magnets.

In some embodiments, the rotary encoder is coupled to the housing cap via a plurality of non-rigid compressible couplings that include a plurality of shoulder screws, and at least some portion of each of the plurality of shoulder screws are located in one of a plurality of springs having first ends that are located below the housing cap and second ends that are opposite to the first ends that are located above the rotary encoder. In some embodiments, the housing cap includes a first set of holes that are along a first perimeter of a first imaginary circle away from an edge of the housing cap, where each hole in the first set of holes includes a low-friction grommet through which a shoulder screw is coupled to the rotary encoder via a spring, where each shoulder screw includes a screw head on one end, a threaded surface on another opposite end, and a smooth shaft between the screw head and the threaded surface, and where the screw head of each shoulder screw is located at or above the housing cap, the smooth shaft of each should shoulder screw is located in one spring, and the threaded surface of each shoulder screw is located in a body of the rotary encoder.

In some embodiments, the housing cap includes a second set of holes that are along a second perimeter of a second imaginary circle that is closer to the edge of the housing cap than the first perimeter of the first imaginary circle that includes the first set of holes, where the second set of holes include screws that couple the housing cap to a flange located at the first end of the housing. In some embodiments, a center region of the first connector includes a third hole, and where a top region of the rotary encoder assembly accessible via the third hole in the first connector. In some embodiments, the plurality of shoulder screws and the plurality of springs are structured to have the rotary encoder retract in a first position away from the housing cap in response to an absence of a metallic material at the third hole in the first connector. In some embodiments, the plurality of shoulder screws and the plurality of springs are structured to have the rotary encoder extend in a second position towards the housing cap in response to a presence of a magnetic material at the third hole in the first connector. In some embodiments, the first connector comprises a groove located towards a rear of the front drivable section, and where the center region of the first connector where the groove ends includes the third hole.

In some embodiments, the vehicle further comprises a rear drivable section located behind the front drivable section, where the rear drivable section comprises a second connector coupled to the first connector, and where the second connector is magnetically coupled to the one or more magnets located on the top of the rotatable shaft of the rotary encoder assembly via the third hole in the first connector. In some embodiments, the rotatable shaft of the rotary encoder is structured to have a rotational movement that corresponds to a circular movement of the second connector of the rear drivable section, and where the circular movement of the second connector of the rear drivable section is translated to the rotational movement of the rotatable shaft via the one or more magnets. In some embodiments, the first connector includes a fifth wheel and where the second connector includes a king pin. In some embodiments, the vehicle includes a semi-trailer truck, where the front drivable section includes a tractor unit, and where the rear drivable section includes a trailer unit.

In some embodiments, the front drivable section includes a computer comprising one or more processors and a memory configured to store one or more programs, where the one or more programs upon execution configure the one or more processors to: receive, from the rotary encoder and while the vehicle is operated on a road, information that indicates an angle or a direction of rotation of the rear drivable section relative to the front drivable section; cause the vehicle to perform an autonomous driving operation based on the angle or the direction of rotation of the rear drivable section. In some embodiments, the one or more processors are configured to cause the vehicle to perform the autonomous driving operation by being configured to: determine that the angle of the rear drivable section is outside a range of angles allowed for the rear drivable section when the vehicle is operated on the road at a speed greater than or equal to a threshold value; and send instruction to a motor in a steering system of the vehicle to cause the vehicle to steer to move the trailer unit within the range of angles allowed for the rear drivable section. In some embodiments, the one or more processors are further configured to: display, on a monitor located in the vehicle, the front drivable section and the rear drivable section, where an orientation of the rear drivable section relative to the front drivable section is displayed based on the angle received from the rotary encoder.

In some embodiments, the rotary encoder is connected to a movable cable, and the base surface includes a second hole located within a region where the housing is connected to the base surface such that at least some portion of the movable cable enters the housing via the second hole

In an exemplary embodiment, a rotary encoder assembly comprises a base surface, a housing, and a rotary encoder. The base surface of the rotary encoder assembly includes a plurality of holes located at close to an edge of the base surface. The housing of the rotary encoder assembly includes a first end that is at least partially open and a second end that is opposite to the first end, where the second end of the housing is connected to the base surface, and where the first end of the housing is coupled to a housing cap. The rotary encoder assembly includes the rotary encoder that is located in the housing in between the base surface and the housing cap, where the rotary encoder includes a rotatable shaft that protrudes from a first hole located in the housing cap, and where a top of the rotatable shaft located away from the rotary encoder is coupled to one or more magnets.

In some embodiments, the top of the rotatable shaft is coupled to the one or more magnets via a shaft adapter that is coupled to the rotatable shaft. In some embodiments, the base surface includes a second hole located within a region where the housing is connected to the base surface such that the rotary encoder is connectable to a movable cable via the second hole, and the second hole in the base station includes a low-friction grommet through which the movable cable is connectable to the rotary encoder. In some embodiments, the rotary encoder is coupled to the housing cap via a plurality of non-rigid compressible couplings. In some embodiments, the first hole located in the housing cap includes a low-friction grommet through which at least some of the rotatable shaft protrudes from the first hole in the housing cap.

In yet another exemplary aspect, the above-described methods and the methods described in this patent document are embodied in a computer readable program stored on a non-transitory computer readable media. The computer readable program includes code that when executed by a processor, causes the processor to perform the methods described in this patent document.

In yet another exemplary embodiment, a device is disclosed that is configured or operable to perform the above-described methods and/or methods described in this patent document.

The above and other aspects and their implementations are described in greater detail in the drawings, the descriptions, and the claims.

BRIEF DESCRIPTION OF THE DRAWING

FIG. 1 shows a block diagram of an example ecosystem in which angle and/or orientation of a rear drivable section of a vehicle can be measured relative to a front drivable section of the vehicle.

FIG. 2 shows a rear view of a semi-trailer truck with a fifth wheel.

FIGS. 3A and 3B respectively show an isometric view and a top view of the fifth wheel with a rotary encoder assembly.

FIG. 3C shows a side cross-section view of a trailer unit and a fifth wheel along with a direction in which the trailer unit is moving to engage the fifth wheel.

FIG. 3D shows a side cross-section view of a trailer unit and a fifth wheel where the trailer unit that has engaged the fifth wheel.

FIGS. 3E and 3F are enlarged views of a rotary encoder assembly with a rotary encoder that is respectively in a retracted position and in an extended position.

FIGS. 4A and 4B respectively show an isometric view and a cross-section view of a rotary encoder assembly.

FIG. 4C shows an example shoulder screw.

DETAILED DESCRIPTION

Development in autonomous driving technology had led to the development of passenger vehicles that can autonomously drive passengers to a destination. However, certain unique challenges need to be addressed when autonomous driving technology is employed in a vehicle with multiple drivable sections (e.g., a semi-trailer trucks). For example, semi-trailer trucks can have multiple drivable sections where, for example, a tractor unit where a driver may sit moves differently than a trailer unit where goods may be located, where the trailer unit is connected to the tractor unit. Unlike semi-trailer trucks, passenger vehicles can be more easily maneuvered on roads at least because passenger vehicles tend to have a single rigid body. This patent document describes technology that can enable a vehicle with multiple drivable sections (e.g., a semi-trailer truck with tractor unit and trailer unit, a truck or a car with fifth wheel camper) to measure an angle and/or orientation (e.g., direction or rotation) of a rear drivable section (e.g., trailer unit or fifth wheel camper) relative to a front drivable section (e.g., a tractor unit, truck, or car) so that the vehicle can be autonomously driven by taking into account, for example, the angle and/or orientation of the rear drivable section relative to the front drivable section.

As shown below, in Section I, this patent document describes the devices located on or in a vehicle that can use angle and/or orientation measurements for autonomous driving operations. In Section II of this patent document, technologies are described to enable measurement of the angle and/or orientation of a rear drivable section of a vehicle relative to a front drivable section of the vehicle. The example headings for the various sections below are used to facilitate the understanding of the disclosed subject matter and do not limit the scope of the claimed subject matter in any way. Accordingly, one or more features of one example section can be combined with one or more features of another example section.

I. Example Autonomous Vehicle Technology for Using Angle and/or Orientation Measurements

FIG. 1 shows a block diagram of an example vehicle ecosystem 100 in which operations related to autonomous driving can be implemented in an in-vehicle control computer 150. The vehicle ecosystem 100 includes several systems and components that can generate and/or deliver one or more sources of information/data and related services to the in-vehicle control computer 150 that may be located in a vehicle 105. Examples of vehicle 105 include a car, a truck, or a semi-trailer truck. The in-vehicle control computer 150 can be in data communication with a plurality of vehicle subsystems 140, all of which can be resident in a user's vehicle 105. A vehicle subsystem interface 160 (e.g., a controller area network (CAN) device) is provided to facilitate data communication between the in-vehicle control computer 150 and the plurality of vehicle subsystems 140.

The vehicle 105 may include various vehicle subsystems that support of the operation of vehicle 105. The vehicle subsystems may include a vehicle drive subsystem 142, a vehicle sensor subsystem 144, and/or a vehicle control subsystem 146. The vehicle drive subsystem 142 may include components operable to provide powered motion for the vehicle 105. In an example embodiment, the vehicle drive subsystem 142 may include an engine or motor, wheels/tires, a transmission, an electrical subsystem, and a power source.

The vehicle sensor subsystem 144 may include a number of sensors configured to sense information about an environment or condition of the vehicle 105. For example, the vehicle sensor subsystem 144 may include a rotary encoder assembly, an inertial measurement unit (IMU), a Global Positioning System (GPS) transceiver, a RADAR unit, a laser range finder/LIDAR unit, and/or one or more cameras or image capture devices. As further explained in Section II of this patent document, the rotary encoder assembly is designed or configured to provide one or more measurements related to angle and/or orientation of a rear drivable section (e.g., tractor unit) relative to the front drivable section (e.g., trailer unit). In some embodiments, the rotary encoder assembly may be an absolute encoder that can provide angle and/or orientation of the rear drivable section relative to the front drivable section. The vehicle sensor subsystem 144 may also include sensors configured to monitor internal systems of the vehicle 105 (e.g., an O₂ monitor, a fuel gauge, an engine oil temperature).

The IMU may include any combination of sensors (e.g., accelerometers and gyroscopes) configured to sense position and orientation changes of the vehicle 105 based on inertial acceleration. The GPS transceiver may be any sensor configured to estimate a geographic location of the vehicle 105. For this purpose, the GPS transceiver may include a receiver/transmitter operable to provide information regarding the position of the vehicle 105 with respect to the Earth. The RADAR unit may represent a system that utilizes radio signals to sense objects within the local environment of the vehicle 105. In some embodiments, in addition to sensing the objects, the RADAR unit may additionally be configured to sense the speed and the heading of the objects proximate to the vehicle 105. The laser range finder or LIDAR unit may be any sensor configured to sense objects in the environment in which the vehicle 105 is located using lasers. The cameras may include one or more devices configured to capture a plurality of images of the environment of the vehicle 105. The cameras may be still image cameras or motion video cameras.

The vehicle control system 146 may be configured to control operation of the vehicle 105 and its components. Accordingly, the vehicle control system 146 may include various elements such as a throttle, a brake unit, a navigation unit, and/or a steering system.

The throttle may be configured to control, for instance, the operating speed of the engine and, in turn, control the speed of the vehicle 105. The brake unit can include any combination of mechanisms configured to decelerate the vehicle 105. The brake unit can use friction to slow the wheels in a standard manner. The navigation unit may be any system configured to determine a driving path or route for the vehicle 105. The navigation unit may additionally be configured to update the driving path dynamically while the vehicle 105 is in operation. In some embodiments, the navigation unit may be configured to incorporate data from the GPS transceiver and one or more predetermined maps so as to determine the driving path for the vehicle 105. The steering system may represent any combination of mechanisms that may be operable to adjust the heading of vehicle 105 in an autonomous mode or in a driver-controlled mode.

Many or all of the functions of the vehicle 105 can be controlled by the in-vehicle control computer 150. The in-vehicle control computer 150 may include at least one data processor 170 (which can include at least one microprocessor) that executes processing instructions stored in a non-transitory computer readable medium, such as the memory 175. The in-vehicle control computer 150 may also represent a plurality of computing devices that may serve to control individual components or subsystems of the vehicle 105 in a distributed fashion. In some embodiments, the data storage device 175 may contain processing instructions (e.g., program logic) executable by the data processor 170 to perform various methods and/or functions of the vehicle 105, including those described in this patent document. For instance, as further explained in Section II of this patent document, the data processor 170 executes the operations associated with autonomous driving module 165 for using the information provided by the rotary encoder assembly (e.g., the angle and/or orientation of the rear drivable section relative to the front drivable section of a vehicle 105) for operating the various vehicle subsystems (e.g., the vehicle drive subsystem 142, the vehicle sensor subsystem 144, and the vehicle control subsystem 146) of the vehicle 105 to autonomously operate the vehicle 105. The data storage device 175 may contain additional instructions as well, including instructions to transmit data to, receive data from, interact with, or control one or more of the vehicle drive subsystem 142, the vehicle sensor subsystem 144, and the vehicle control subsystem 146. The in-vehicle control computer 150 can be configured to include a data processor 170 and a data storage device 175.

The in-vehicle control computer 150 may control the function of the vehicle 105 based on inputs received from various vehicle subsystems (e.g., the vehicle drive subsystem 142, the vehicle sensor subsystem 144, and the vehicle control subsystem 146). For example, the in-vehicle control computer 150 may use data from the rotary encoder assembly in order to control the steering system to turn the vehicle 105 by taking into account the orientation and angle of the rear drivable section relative to the front drivable section. In an example embodiment, the in-vehicle control computer 150 can be operable to provide control over many aspects of the vehicle 105 and its subsystems.

II. Example Rotary Encoder Assembly for Performing Angle and/or Orientation Measurements

FIG. 2 shows a rear view of a semi-trailer truck with a fifth wheel. The semi-trailer truck includes a tractor unit 202 that includes a fifth wheel 204 that is located towards a rear region 212 of the tractor unit 202. The fifth wheel 204 is movably coupled to the chassis 210 of the semi-trailer truck so that the fifth wheel 204 can be moved towards or away from a cab 206 of the tractor unit 202 for installation of different types of trailer units. The fifth wheel 204 may have a “A” shape cutout region or upside down “V” shape cutout region or a groove that is located on the fifth wheel 204 towards the rear of the tractor unit 202 or away from a cab 206 in the tractor unit 202 where a driver may sit. The groove extends inwards from an edge of the fifth wheel 204 that is farthest away from the cab 206. The groove ends at a center region 208 of the fifth wheel 204. The groove in the fifth wheel allows a trailer unit's king pin to slide inside and lock the trailer unit and the fifth wheel together in place so that the trailer unit is coupled to the tractor unit via the king pin and the fifth wheel. The fifth wheel may be covered with grease so that the trailer unit can slide along the top surface of the fifth wheel. In the center region 208 of the groove is a hole through which a rotary encoder assembly can engage with a king pin of a trailer unit as further explained below. In certain traditional implementations, a fifth wheel does not include a position sensing equipment so that there may be no sensing or measurement of the angle of the trailer unit at the fifth-wheel.

FIGS. 3A and 3B respectively show an isometric view and a top view of the fifth wheel 302 with a rotary encoder assembly 304 that is located in or below a hole 306 in the fifth wheel 302. FIG. 3C shows a side cross-section view of a trailer unit 308 and a fifth wheel 302 along with a direction in which a trailer unit 308 is moving to engage the fifth wheel 302. The trailer unit 308 includes a king pin 310 that slides within the groove of the fifth wheel 302 as the trailer engages the fifth wheel 302 in a direction from right to left in FIG. 3C. Below the fifth wheel 302 is a mounting surface 316 that may be connected to the fifth wheel 302 so that the mounting surface 316 and the fifth wheel 302 can move towards or away from the cab in the tractor unit for installation of different types of trailer units. A bottom portion of a rotary encoder assembly 304 may be coupled to the mounting surface 316 below the fifth wheel 302. The rotary encoder assembly 304 is coupled to the mounting surface 316 below the fifth wheel 302 at a location where at least some portion of the rotary encoder assembly 304 overlaps with and is below the hole 306 in the fifth wheel 302 as shown in FIGS. 3A and 3B. In some embodiments, the rotary encoder assembly 304 is coupled to the mounting surface 316 below the fifth wheel 302 at a location where the rotary encoder assembly 304 is directly below a center region of the fifth wheel 302 so that at least a top region of the rotary encoder assembly 304 is accessible via the hole 306.

One of the technical benefits having the rotary encoder assembly 304 couple to the mounting surface 316 below the fifth wheel 302 is that rotary encoder assembly 304 can be installed on a single tractor unit rather than being installed on multiple trailer units. Furthermore, the rotary encoder assembly 304 can installed on the tractor unit without involving the driver. Another technical benefit of the rotary encoder assembly being located on or in the tractor unit is that the rotary encoder assembly 304 can be communicably coupled (e.g., via a cable 314 in FIGS. 3D-3F) to the in-vehicle control computer (shown as 150 in FIG. 1) which can also located in the tractor unit to provide an angle and/or an orientation related information of the trailer unit.

FIG. 3D shows a side cross-section view of a trailer unit 308 and a fifth wheel 302 where the trailer unit 308 that has engaged the fifth wheel 302. As further explained in FIGS. 4A to 4B, a top region of the rotary encoder assembly 304 includes one or more magnets so that when a metallic king pin 310 (e.g., steel king pin) of the trailer unit 308 is within a magnetic field of the one or more magnets located on top of the rotary encoder assembly 304, at least some portion of the rotary encoder assembly 304, such as the rotary encoder 312, extends towards and magnetically couples with (or magnetically attaches to) the king pin 310. FIG. 3E is an enlarged view of a rotary encoder assembly 304 with a rotary encoder 312 that is in a retracted position when the king pin 310 is moving to engage the fifth wheel 302 and is not close to the rotary encoder assembly 304 or when the king pin 310 is absent from the hole 306 in the fifth wheel 302. In FIG. 3E, the arrow pointing to the left shows the movement of the king pin 310 and the trailer unit 308. When the king pin 310 is not within the magnetic field of the one or more magnets located on top of the rotary encoder assembly 304, the rotary encoder 312 and the cable 314 in the rotary encoder assembly 304 is in a retracted position. When the rotary encoder 312 is in a retracted position, there is some gap in between the top of the one or more magnets located on top of the rotary encoder assembly 304 and the bottom of the king pin that is slid into position to engage the fifth wheel.

FIG. 3F is an enlarged view of a rotary encoder assembly 304 with a rotary encoder 312 that is in an extended position when the king pin 310 is close to the rotary encoder assembly 304 and has engaged the fifth wheel or when at least a portion of the king pin 310 is located above the hole 306 in the fifth wheel 302. In FIG. 3F, the arrow pointing up shows the movement of the rotary encoder 312 and the cable 314 in the rotary encoder assembly 304 when the one or more magnets on top of the rotary encoder assembly 304 are magnetically coupled with the king pin 310 so that the rotary encoder 312 in the rotary encoder assembly 304 is an extended position. When the king pin 310 disengages the fifth wheel and moves away from the rotary encoder assembly 304, the king pin slides off the one or more magnets on top of the rotary encoder assembly 304 which causes the rotary encoder 312 to move downward and in a retracted position.

FIGS. 4A and 4B respectively show an isometric view and a cross-section view of a rotary encoder assembly 400. The rotary encoder assembly 400 may include a housing 402 with top region (or one end) 402 b and a bottom region 402 a (or another end) that is opposite to the top region 402 b. The bottom region 402 a of the housing 402 is connected to a base surface 404. A top region 402 b of housing 402 may have a circular opening with a flange 410 that extends outward from the perimeter of the top region of the housing 402. In some embodiments, as shown in FIGS. 4A and 4B, the housing 402 may have a cylindrical shape. The base surface 404 may have a square or rectangular shape with a plurality of holes that may be located close to (or at some distance away from) an edge of the base surface 404 (e.g., at the corners of the base surface 404). The base surface 404 may include a hole 422 located within a region 438 where the housing 402 is connected to the base surface 404. The hole 422 of the base surface 404 may be used to connect a cable 406 via the base surface 404 to the rotary encoder 408 that is enclosed within the housing 402. The cable 406 includes a set of wires to provide power to the rotary encoder 408 and to receive angle and/or orientation information measured by the rotary encoder 408 to send to the in-vehicle control computer (shown as 150 in FIG. 1). The cable 406 allows the rotary encoder 408 to interface with the in-vehicle control computer via the Society of Automotive Engineers standard SAE J1939 or via a Controller Area Network (CAN) bus. As shown in FIG. 4B, a low-friction grommet or a smooth grommet (e.g., a low-friction nylon shaft grommet) is located at the hole 422 of the base surface 404 in between the cable 406 and the hole 422 so that the rotary encoder 408 along with at least some portion of the cable 406 can move up and down as the compression springs 418 are respectively compressed and extended as further explained below.

The base surface 404 may include four holes as shown in FIG. 4A, where each hole may be located at one of the corners of the base surface 404. The plurality of holes on the corners of the base surface 404 enable the base surface 404 to be coupled via screws to the mounting surface below the fifth wheel. In some embodiments, the base surface 404 may have another shape, such as a circular, oval, or triangular shape where the plurality of holes used to couple the base surface 404 to the mounting surface below the fifth wheel may be located towards the perimeter of the base surface 404.

The flange 410 of the housing 402 includes a plurality of holes that are located around the perimeter of the flange so that a housing cap 414 can be coupled to the housing 402 via screws. For example, as shown in FIG. 4A, four screws 412 a-412 d that are located at or close to the outer perimeter of the housing cap 414 are used to secure the housing cap 414 to the flange 410 of the housing 402. In some embodiments, the flange 410 may extend inward from the perimeter of the top region of the housing 402.

The housing cap 414 can protect the rotary encoder 408 from the environment, such as from grease or debris that may fall from the trailer unit. The housing cap 414 may have flat circular shape which can correspond to the cylindrical shape of the housing 402 in some embodiments. The shape of housing cap 414 may extend up to an edge of the flange 410 or up to an outer wall of the housing 402. The housing cap 414 includes two sets of holes. A first set of holes in the housing cap 414 are located at a first perimeter that is close to the outer edge of the housing cap 414 so that a first set of a plurality of screws (e.g., four screws 412 a-412 d in FIG. 4A) can be used to couple the housing cap 414 to the flange 410 of the housing 402. A second set of holes in the housing cap 414 are included at a second perimeter at some distance from the outer edge of the housing cap 414 so that a second set of a plurality of screws (e.g., four screws 416 a-416 d in FIG. 4A) can be used to couple the rotary encoder 408 to the housing cap 414. The second perimeter of holes in the housing cap can be located within the first perimeter of holes in the housing cap. The second set of plurality of screws may be shoulder screws that have a screw head on one end, a threaded surface on another end, and a smooth shaft (e.g., a cylindrical shaft) between the screw head and the threaded surface. An example of a shoulder screw 416 is shown in FIG. 4C. The shoulder screws are inserted from the top of the housing cap 414 so that the screw head of each shoulder screw is located at or above the housing cap 414 and the threaded surface of each shoulder screw is screwed into the body of the rotary encoder 408.

Each shoulder screw is inserted through a hole in the housing cap 414 thorough a low-friction grommet 420 or a smooth grommet 420 and then through a compression spring 418 to couple with the rotary encoder 408. The low-friction grommets or smooth grommets may be low-friction nylon shaft grommets located at the second set of holes in between the shoulder screws and the second set of holes. The ends of the compressions springs 418 are located in between the rotary encoder 408 and the housing cap 414 so that when the compression springs 418 are mostly extended, the rotary encoder 408 is in a retracted position away from the housing cap 414 within the housing 402 (as shown in FIG. 3E) and when the compression springs 418 are mostly compressed, the rotary encoder 408 is in an extended position towards the housing cap 414 (as shown in FIG. 3F). Thus, when no trailer unit is engaged to the fifth wheel, the rotary encoder 408 is in a retracted position at least because the weight of the rotary encoder 408 and the compression springs 418 push the rotary encoder 408 downward.

At least some portion of the smooth shaft of each shoulder screw is located inside the compression spring 418 so that the shoulder screws 416 a-416 d function as guide rods for compressions springs 418 which can create non-rigid compressible connections or non-rigid compressible couplings between the rotary encoder 408 and the housing 402 and/or between the rotary encoder 408 and the housing cap 414. As shown in FIG. 3F, when the one or more magnets located on top of the rotary encoder assembly 400 is magnetically coupled to the king pin of the trailer unit, at least some portion of a top of the shoulder screws extend above the housing cap of the rotary encoder assembly 400 due to the one or more magnets pulling the rotary encoder 408 (shown as 312 in FIG. 3F) along with the cable 406 (shown as 314 in FIG. 3F) upward towards the king pin.

The rotary encoder 408 may be a commercial off the shelf (COTS) absolute encoder that may provide an angle and/or orientation (e.g., direction of rotation) information to the in-vehicle control computer. In some embodiments, the rotary encoder 408 may be a mechanical rotary encoder, an optical rotary encoder, or electrical rotary encoder. A top region of the rotary encoder 408 includes a rotatable shaft 424. The rotary encoder 408 measures an angle and/or orientation of the rotatable shaft 424 relative to the base surface 404 or the housing 402 of the rotary encoder assembly 400 so that the rotary encoder 408 provides electrical signals to the in-vehicle control computer indicating an angle and/or orientation of the rotatable shaft 424 relative to the base surface 404 or the housing 404 of the rotary encoder assembly 400.

After the rotatable shaft 424 extends with the rotary encoder 408 to couple to the king pin via the one or more magnets 430 and the shaft adapter 424 (as further explained below), the rotatable shaft 424 rotates together with the king pin as the trailer turns. Since the base surface 404 of the rotatable encoder assembly 400 is coupled to the mounting surface below the fifth wheel and since the rotary encoder 408 is coupled to the housing cap via the shoulder screws, when the rotary encoder 408 with the rotatable shaft 424 extends to magnetically couple the king pin, the rotatable shaft 424 of the rotary encoder 408 turns with the king pin while the body of the rotary encoder 408 mostly does not turn with the king pin. Thus, the circular movement of the king pin is translated to the rotatable movement or rotational movement of the rotatable shaft 424, which is used by the rotary encoder 408 to measure the angle and/or orientation of the trailer unit relative to the tractor unit. The rotatable shaft 424 protrudes or extends from a hole 426 in the center of the housing cap 414. As shown in FIG. 4B, a low-friction grommet or a smooth grommet (e.g., a low-friction nylon shaft grommet) is located at the hole 426 in the center of the housing cap 414 in between the rotatable shaft 424 and the hole 426 in the center of the housing cap 414 so that the rotatable shaft 424 (which is part of the rotary encoder 408) along with at least some portion of the cable 406 can move up and down as the compression springs 418 are respectively compressed and extended as explained above.

A top region of the rotatable shaft 424 includes a shaft adapter 428 which can be coupled to the rotatable shaft by press fit or by a screw. The shaft adapter 428 may have a bottom region (e.g., a cylindrical shape region) that can couple to the rotatable shaft 424. Above the bottom region, the shaft adapter 428 may have a top region (e.g., a cylindrical shape region) that extends outward from the bottom region of the shaft adapter 428. The top region of the shaft adapter 428 has a larger width than the bottom region of the shaft adapter 428 so that the top region of the shaft adapter 428 can be coupled to one or more magnets 430. As shown in FIG. 4B, the top surface of the top region of the shaft adapter 428 may include a threaded hole 434 so that the one or more magnets 430 can be coupled to the top of the top region via the threaded hole 434 via a screw 436. One of the technical benefits of having one or more magnets 430 that can be couple to the top of the rotary encoder 408 is that the one or more magnets 430 can facilitate an easy or flexible height adjustment so that the top of the one or more magnets 430 can magnetically couple to the king pin of the trailer unit. Thus, the flexibility provided by the rotary encoder assembly design described in this document can minimize situations where different rotary encoder assemblies needs to be designed for different king pin design or for different mounting surfaces below the fifth wheel.

The base surface 404, the housing 402, the housing cap 414, and/or the shaft adapter 428 can be made of machined aluminum or other non-magnetic metal so that at least these parts do not interfere with the magnetic coupling operation of the one or more magnets 430 with the king pin of the trailer unit.

In FIG. 1, the angle and/or orientation information provided by the rotary encoder assembly may be used by the autonomous driving module 165 in the in-vehicle control computer 150 to control the vehicle 105. For example, when the vehicle 105 is being parked or is reversed into a dock, the angle and/or orientation information provided by the rotary encoder assembly along with videos from one or more cameras located on the vehicle 105 can enable the autonomous driving module 165 to display a position of the trailer unit on a screen in the vehicle 105 so that the driver may have an accurate understanding of the vehicle 105 with a trailer unit along with any objects surrounding the vehicle 105 when the vehicle is being parked. In some embodiments, the autonomous driving module 165 can control the steering and/or braking of the vehicle 105 based at least on the angle and/or orientation information provided by the rotary encoder assembly. For example, when the vehicle 105 is autonomously parked in a dock or when the vehicle 105 is turning on a road, the autonomous driving module 165 can determine the angle and/or orientation of the trailer unit using the information provided by the rotary encoder assembly and the autonomous driving module 165 can determine position(s) of one or more objects (e.g., vehicles or pedestrians) using video from one or more cameras on the vehicle 105 to control the steering and/or braking of the vehicle 105 so that the movement of the trailer unit is controlled by the autonomous driving module 165.

In another example, when the vehicle 105 is stopped at a traffic sign and is about to make a turn, the autonomous driving module 165 can determine, using the video provided by the one or more cameras and the angle and/or orientation information from the rotary encoder assembly, that the trailer unit may hit another vehicle is located close to the trailer unit of the vehicle 105. In this example, the autonomous driving module 165 can determine a trajectory for the vehicle 105 to steer the vehicle 105 in a way to avoid having the trailer unit hit the vehicle or the autonomous driving module 165 may keep applying brakes until the another vehicle has driven away so that the autonomous driving module 165 can safely turn the vehicle 105.

In yet another example, when the autonomous driving module 165 determines that the vehicle 105 is being driven on a road and that the trailer unit not within a range of angles from a position of the tractor unit (e.g., within ±2 degrees of 180 degrees from the position of the tractor unit or within 179 degrees and 181 degrees from the position of the tractor unit), then the autonomous driving module 165 may apply corrective steering to move the trailer unit to be within the range of angles from the position of the tractor unit. In this example, a gust of wind may have moved the trailer unit relative to the tractor unit so that if the trailer unit move to the left (assuming the vehicle 105 is driven in a north direction), then the autonomous driving module 165 can instruct the motors in the steering system to turn to the left to move the trailer unit back so that the angle formed by the trailer unit relative to the tractor unit is within the range of angles. In some embodiments, the range of angles may be pre-determined or the range of angles may be a function of the speed of the vehicle (e.g., the range of angles is ±2 degrees of 180 degrees if the speed of the vehicle 105 is greater than or equal to a threshold value (e.g., 40 mph) and is ±1 degrees of 180 degrees if the speed of the vehicle is greater than or equal to another threshold value (e.g., 60 mph)).

In some embodiments, the autonomous driving module 165 can update an estimate of the center of gravity to establish a stable boundary around the vehicle 105 based on the angle and/or orientation information provided by the rotary encoder assembly. Knowing the center of gravity of the trailer unit as well as the tractor unit (also known as bobtail), the angle subtended by the trailer unit and the tractor unit can determine where an instantaneous center of gravity of the truck as a whole may be located. Unlike rigid vehicle such as cars and buses, vehicles with multiple drivable sections (e.g., a semi-trailer truck) have a moving center of gravity since it can be composed of at least two objects that are joined by the fifth wheel. In some embodiments, the autonomous driving module 165 may refer to a standard equation that provides an estimate of center of gravity based on an angle measured by the rotary encoder assembly.

The following section describes example features as described in this document:

Feature 1: A truck, comprising: a tractor, comprising: a first connector; and an angle measuring device coupled to the first connector; and a trailer, comprising: a second connector, connecting to the first connector; and at least one magnetic device coupled to the second connector, wherein the angle measuring device measures a motion of the at least one magnetic device, wherein an angle between the tractor and the trailer is determined based on a measurement conducted by the angle measuring device.

Feature 2: The truck of feature 1, wherein the first connector comprises a fifth-wheel, the second connector comprises a kingpin.

Feature 3: The truck of feature 1, wherein the angle measuring device comprises a rotary encoder.

Feature 4: The truck of feature 3, wherein the motion of the at least one magnetic device is translated to a shaft of the rotary encoder.

Feature 5: The truck of feature 1, wherein the angle measuring device measures a rotation of the second connector by measuring the at least one magnetic device.

Feature 6: The truck of feature 1, wherein a boundary of the truck is depicted based on the angle between the tractor and the trailer.

Feature 7: The truck of feature 1, wherein the at least one magnetic device comprises at least one of magnet attached on the second connector, wherein the at least one of magnet is detachable.

Feature 8: The truck of feature 7, wherein at least one sensor is attached to the second connector via the at least one magnet.

Feature 9: A tractor, configured to tow a trailer of a truck, comprising: a first connector, connecting to a second connector of the trailer; and an angle measuring device coupled to the first connector, wherein the angle measuring device measures a motion of at least one magnetic device coupled to the second connector, wherein an angle between the tractor and the trailer is determined based on a measurement conducted by the angle measuring device.

Feature 10: A trailer, configured to be towed by a tractor of a truck, wherein the tractor comprises a first connector and an angle measuring device coupled to the first connector, the trailer comprises: a second connector, connecting to the first connector; and at least one magnetic device coupled to the second connector, wherein the angle measuring device measures a motion of the at least one magnetic device, wherein an angle between the tractor and the trailer is determined based on a measurement conducted by the angle measuring device.

Feature 11: A system, comprising: an internet server, comprising: an I/O port, configured to transmit and receive electrical signals to and from a client device; a memory; one or more processing units; and one or more programs stored in the memory, the one or more programs configured to cause the one or more processing units to perform at least: measuring, by an angle measuring device coupled to a first connector of a tractor, a motion of at least one magnetic device, wherein the at least one magnetic device is coupled to a second connector of a trailer, wherein the first connector is connected to the second connector; and determining an angle between the tractor and the trailer based on a measurement conducted by the angle measuring device.

Feature 12: A method, comprising: measuring, by an angle measuring device coupled to a first connector of a tractor, a motion of at least one magnetic device, wherein the at least one magnetic device is coupled to a second connector of a trailer, wherein the first connector is connected to the second connector; and determining an angle between the tractor and the trailer based on a measurement conducted by the angle measuring device.

Feature 13: A non-transitory computer-readable medium storing a program causing a computer to execute a process, the process comprising: measuring, by an angle measuring device coupled to a first connector of a tractor, a motion of at least one magnetic device, wherein the at least one magnetic device is coupled to a second connector of a trailer, wherein the first connector is connected to the second connector; and determining an angle between the tractor and the trailer based on a measurement conducted by the angle measuring device.

In this document the term “exemplary” is used to mean “an example of” and, unless otherwise stated, does not imply an ideal or a preferred embodiment. In this document, while the techniques to measure angle and/or orientation (e.g., direction of rotation) of a rear drivable section relative to a front drivable section is described in the context of a semi-trailer truck, the rotary encoder assembly may be installed on other types of multiple drivable sections (e.g., on or in a hitch on a truck or on a car with fifth wheel camper).

Some of the embodiments described herein are described in the general context of methods or processes, which may be implemented in one embodiment by a computer program product, embodied in a computer-readable medium, including computer-executable instructions, such as program code, executed by computers in networked environments. A computer-readable medium may include removable and non-removable storage devices including, but not limited to, Read Only Memory (ROM), Random Access Memory (RAM), compact discs (CDs), digital versatile discs (DVDs), etc. Therefore, the computer-readable media can include a non-transitory storage media. Generally, program modules may include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. Computer- or processor-executable instructions, associated data structures, and program modules represent examples of program code for executing steps of the methods disclosed herein. The particular sequence of such executable instructions or associated data structures represents examples of corresponding acts for implementing the functions described in such steps or processes.

Some of the disclosed embodiments can be implemented as devices or modules using hardware circuits, software, or combinations thereof. For example, a hardware circuit implementation can include discrete analog and/or digital components that are, for example, integrated as part of a printed circuit board. Alternatively, or additionally, the disclosed components or modules can be implemented as an Application Specific Integrated Circuit (ASIC) and/or as a Field Programmable Gate Array (FPGA) device. Some implementations may additionally or alternatively include a digital signal processor (DSP) that is a specialized microprocessor with an architecture optimized for the operational needs of digital signal processing associated with the disclosed functionalities of this application. Similarly, the various components or sub-components within each module may be implemented in software, hardware or firmware. The connectivity between the modules and/or components within the modules may be provided using any one of the connectivity methods and media that is known in the art, including, but not limited to, communications over the Internet, wired, or wireless networks using the appropriate protocols.

While this document contains many specifics, these should not be construed as limitations on the scope of an invention that is claimed or of what may be claimed, but rather as descriptions of features specific to particular embodiments. Certain features that are described in this document in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable sub-combination. Moreover, although features may be described above as acting in certain combinations and even initially claimed as such, one or more features from a claimed combination can in some cases be excised from the combination, and the claimed combination may be directed to a sub-combination or a variation of a sub-combination. Similarly, while operations are depicted in the drawings in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed, to achieve desirable results.

Only a few implementations and examples are described and other implementations, enhancements and variations can be made based on what is described and illustrated in this disclosure. 

What is claimed is:
 1. A vehicle, comprising: a front drivable section, comprising: a first connector coupled to a chassis of the front drivable section, wherein the first connector is located towards a rear region of the first drivable section; and a rotary encoder assembly, comprising: a base surface coupled to a surface located below the first connector; a housing that includes a first end that is at least partially open and a second end that is opposite to the first end, wherein the second end of the housing is connected to the base surface, and wherein the first end of the housing is coupled to a housing cap; and a rotary encoder that is located in the housing in between the base surface and the housing cap, wherein the rotary encoder includes a rotatable shaft that protrudes from a first hole located in the housing cap, and wherein a top of the rotatable shaft located away from the rotary encoder is coupled to one or more magnets.
 2. The vehicle of claim 1, wherein the rotary encoder is coupled to the housing cap via a plurality of non-rigid compressible couplings that include a plurality of shoulder screws, and wherein at least some portion of each of the plurality of shoulder screws are located in one of a plurality of springs having first ends that are located below the housing cap and second ends that are opposite to the first ends that are located above the rotary encoder.
 3. The vehicle of claim 2, wherein the housing cap includes a first set of holes that are along a first perimeter of a first imaginary circle away from an edge of the housing cap, wherein each hole in the first set of holes includes a low-friction grommet through which a shoulder screw is coupled to the rotary encoder via a spring, wherein each shoulder screw includes a screw head on one end, a threaded surface on another opposite end, and a smooth shaft between the screw head and the threaded surface, and wherein the screw head of each shoulder screw is located at or above the housing cap, the smooth shaft of each should shoulder screw is located in one spring, and the threaded surface of each shoulder screw is located in a body of the rotary encoder.
 4. The vehicle of claim 3, wherein the housing cap includes a second set of holes that are along a second perimeter of a second imaginary circle that is closer to the edge of the housing cap than the first perimeter of the first imaginary circle that includes the first set of holes, wherein the second set of holes include screws that couple the housing cap to a flange located at the first end of the housing.
 5. The vehicle of claim 2, wherein a center region of the first connector includes a third hole, and wherein a top region of the rotary encoder assembly accessible via the third hole in the first connector.
 6. The vehicle of claim 5, wherein the plurality of shoulder screws and the plurality of springs are structured to have the rotary encoder retract in a first position away from the housing cap in response to an absence of a metallic material at the third hole in the first connector.
 7. The vehicle of claim 5, wherein the plurality of shoulder screws and the plurality of springs are structured to have the rotary encoder extend in a second position towards the housing cap in response to a presence of a magnetic material at the third hole in the first connector.
 8. The vehicle of claim 5, wherein the first connector comprises a groove located towards a rear of the front drivable section, and wherein the center region of the first connector where the groove ends includes the third hole.
 9. The vehicle of claim 5, further comprising: a rear drivable section located behind the front drivable section, wherein the rear drivable section comprises a second connector coupled to the first connector, and wherein the second connector is magnetically coupled to the one or more magnets located on the top of the rotatable shaft of the rotary encoder assembly via the third hole in the first connector.
 10. The vehicle of claim 9, wherein the rotatable shaft of the rotary encoder is structured to have a rotational movement that corresponds to a circular movement of the second connector of the rear drivable section, and wherein the circular movement of the second connector of the rear drivable section is translated to the rotational movement of the rotatable shaft via the one or more magnets.
 11. The vehicle of claim 9, wherein the first connector includes a fifth wheel and wherein the second connector includes a king pin.
 12. The vehicle of claim 9, wherein the vehicle includes a semi-trailer truck, wherein the front drivable section includes a tractor unit, and wherein the rear drivable section includes a trailer unit.
 13. The vehicle of claim 9, wherein the front drivable section includes a computer comprising one or more processors and a memory configured to store one or more programs, wherein the one or more programs upon execution configure the one or more processors to: receive, from the rotary encoder and while the vehicle is operated on a road, information that indicates an angle or a direction of rotation of the rear drivable section relative to the front drivable section; cause the vehicle to perform an autonomous driving operation based on the angle or the direction of rotation of the rear drivable section.
 14. The vehicle of claim 13, wherein the one or more processors are configured to cause the vehicle to perform the autonomous driving operation by being configured to: determine that the angle of the rear drivable section is outside a range of angles allowed for the rear drivable section when the vehicle is operated on the road at a speed greater than or equal to a threshold value; and send instruction to a motor in a steering system of the vehicle to cause the vehicle to steer to move the trailer unit within the range of angles allowed for the rear drivable section.
 15. The vehicle of claim 13, wherein the one or more processors are further configured to: display, on a monitor located in the vehicle, the front drivable section and the rear drivable section, wherein an orientation of the rear drivable section relative to the front drivable section is displayed based on the angle received from the rotary encoder.
 16. The vehicle of claim 1, wherein the rotary encoder is connected to a movable cable, and wherein the base surface includes a second hole located within a region where the housing is connected to the base surface such that at least some portion of the movable cable enters the housing via the second hole
 17. A rotary encoder assembly, comprising: a base surface comprising a plurality of holes located at close to an edge of the base surface; a housing that includes a first end that is at least partially open and a second end that is opposite to the first end, wherein the second end of the housing is connected to the base surface, and wherein the first end of the housing is coupled to a housing cap; and a rotary encoder that is located in the housing in between the base surface and the housing cap, wherein the rotary encoder includes a rotatable shaft that protrudes from a first hole located in the housing cap, and wherein a top of the rotatable shaft located away from the rotary encoder is coupled to one or more magnets.
 18. The rotary encoder assembly of claim 17, wherein the top of the rotatable shaft is coupled to the one or more magnets via a shaft adapter that is coupled to the rotatable shaft.
 19. The rotary encoder assembly of claim 17, wherein the base surface includes a second hole located within a region where the housing is connected to the base surface such that the rotary encoder is connectable to a movable cable via the second hole, and wherein the second hole in the base station includes a low-friction grommet through which the movable cable is connectable to the rotary encoder.
 20. The rotary encoder assembly of claim 17, wherein the first hole located in the housing cap includes a low-friction grommet through which at least some of the rotatable shaft protrudes from the first hole in the housing cap. 